<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>

<script type="text/javascript">

</script>
<head>
	<title>bookStore列表</title>
	<%--导入css --%>
	<link rel="stylesheet" href="${basePath}/css/main.css" type="text/css" />
</head>
<body class="main">

<jsp:include page="${basePath}/head.jsp" />

<jsp:include page="${pageContext.request.contextPath}/menu_search.jsp" />

<div id="divpagecontent">
	<table width="100%" border="0" cellspacing="0">
		<tr>

			<td>
				<div style="text-align:right; margin:5px 10px 5px 0px">
					<a href="${pageContext.request.contextPath}/index.jsp">首页</a>&nbsp;&nbsp;&nbsp;&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;美食&nbsp;&nbsp;&nbsp;&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;美食列表
				</div>
				<table cellspacing="0" class="listcontent">
					<tr>
						<td>
							<h1>美食目录</h1>
							<hr />
							<h1>山珍海味</h1>&nbsp;&nbsp;&nbsp;&nbsp;共100种美食
							<hr />
							<div style="margin-top:20px; margin-bottom:5px">
								<img src="${path}/images/productlist.gif" width="100%" height="38" />
							</div>
							<table cellspacing="0" class="booklist">
								<tr>
									<c:forEach items="${p.beanList}" var="qhy">
										<td>

											<div class="divbookpic">
												<p>
													<a href="${pageContext.request.contextPath}/product/findProductById.action?id=${qhy.id}"><img src="/${qhy.img_url}" width="115" height="129" border="0" /> </a>
												</p>
											</div>
											<div class="divlisttitle">
												<a href="${pageContext.request.contextPath}/product/findProductById.action?id=${qhy.id}">菜名:${qhy.name}<br />售价:${qhy.price} </a>
											</div></td></c:forEach>
								</tr>
							</table>
							<div class="pagination">
								<ul>
									<li class="disablepage"><a onclick="return previouspage()" href="${path}/product/pageListProduct.action?pageCode=${p.pageCode-1}">上一页 &lt;&lt;</a>
									</li>
									<li>第${p.pageCode}页/共${p.totalPage}页</li>
									<li class="nextpage"><a onclick=" return nextpage()"
															href="${pageContext.request.contextPath}/product/pageListProduct.action?pageCode=${p.pageCode+1}">下一页&gt;&gt;</a>
									</li>
								</ul>
							</div>
						</td>
					</tr>
				</table></td>
		</tr>
	</table>
</div>
<jsp:include page="foot.jsp" />
</body>

<script type="text/javascript">
	function nextpage() {//下一页
	    var yy="${p.pageCode}"
		var uu="${p.totalPage}"
		if (yy==uu){
			return false;
		}else {
		    return true;
		}
    }
    function previouspage() {
        var yy="${p.pageCode}"
		if (yy==1){
            return false;
		}else{
		    return true;
		}
    }
</script>
</html>
